﻿using System.Web.Services.Protocols;
using System.Xml;

namespace MedicService.Server.Exception
{   

    public class DbException: SoapException
    {
        private static XmlNode CreateDetails()
        {
            var doc = new System.Xml.XmlDocument();
            var node = doc.CreateNode(XmlNodeType.Element,
                 SoapException.DetailElementName.Name, SoapException.DetailElementName.Namespace);
            node.InnerText = "DataBaseException";
            return node;
        }

        public DbException(): base("Ошибка при работе с базой данных", SoapException.ClientFaultCode, "", CreateDetails()) {
        }

    }
}